﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="operacao_fiscal_formulario.aspx.cs" Inherits="softsales.pagina.operacao_fiscal.operacao_fiscal_formulario" %>
<%@ MasterType VirtualPath="~/Site.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Cabecalho" runat="server">

<script type="text/javascript">

    $(document).ready(function () {
 
        function cfop() {

        /* ABRE MODAL CFOP */
            $("#<%=IMG_BTN_ABRIR_MODAL_CFOP.ClientID %>").click(function () {

                if (id_operacao == "0") {
                    OpenModal('../cfop/cfop_modal.aspx?tipo=E', '', '400', '800');
                }
                else {

                    OpenModal('../cfop/cfop_modal.aspx?tipo=S', '', '400', '800');
                }
            });


               cfop();

        var prm = Sys.WebForms.PageRequestManager.getInstance();
        if (prm != null) {
            //Registrando uma chamada a função inicializa() após o fim da renderização parcial da página.
            prm.add_endRequest(function () {
                cfop();
            });

        }


    });
</script> 

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ConteudoPrincipal" runat="server">
		
			<div class="inner-page-title">
				<h2><asp:Label ID="LBL_TITULO_PAGINA" runat="server" Text="tb_operacao_fiscal"></asp:Label></h2>
					
				</div>
 
    
               <ajaxToolkit:TabContainer ID="TAB_CONTAINER" runat="server" 
                ActiveTabIndex="0" Width="100%">
                   <ajaxToolkit:TabPanel runat="server" HeaderText="TabPanel1" ID="TAB_OPERACAO_FISCAL">
                   <HeaderTemplate>NATUREZA OPERAÇÃO FISCAL</HeaderTemplate>
                   <ContentTemplate><div class="softsales-form">
                   <div class="softsales-form-linha"><div class="grid_12"><!-- CAMPO DATETIME --><label for="Label_DESC_OPERACAO_FISCAL">NATUREZA OPERACAO_FISCAL</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text full requerido" 
                        ID="TXT_DESC_OPERACAO_FISCAL" runat="server"></asp:TextBox></div><div class="softsales-form-error"><asp:RequiredFieldValidator ID="RFV_DESC_OPERACAO_FISCAL" ControlToValidate="TXT_DESC_OPERACAO_FISCAL" runat="server" ErrorMessage="Campo Requerido"></asp:RequiredFieldValidator></div></div></div><div class="softsales-form-linha"><div class="grid_12"><label for="Label_DESC_NOTA_FISCAL">DESCRIÇÃO DA INFORMAÇÃO ADICIONAL NOTA_FISCAL</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text full" 
                    ID="TXT_DESC_NOTA_FISCAL" runat="server" TextMode="MultiLine"></asp:TextBox></div></div><div class="clear"></div></div><div class="softsales-form-linha"><div class="grid_6"><label for="Label_ID_CRT">CRT</label> <div class="softsales-form-campo"><asp:DropDownList CssClass="campo-select full" 
                        ID="DDL_ID_CRT" runat="server"></asp:DropDownList></div><div class="softsales-form-error"><asp:RequiredFieldValidator ID="RFV_ID_CRT" ControlToValidate="DDL_ID_CRT" runat="server" ErrorMessage="Campo Requerido"></asp:RequiredFieldValidator></div></div><div class="grid_6"><label for="Label_ID_TIPO_CADASTRO_FISCAL">TIPO_CADASTRO_FISCAL</label> <div class="softsales-form-campo"><asp:DropDownList ID="DDL_ID_TIPO_CADASTRO_FISCAL" runat="server" 
                        CssClass="campo-text select full"></asp:DropDownList></div><div class="softsales-form-error"><asp:RequiredFieldValidator ID="RFV_ID_TIPO_CADASTRO_FISCAL" ControlToValidate="DDL_ID_TIPO_CADASTRO_FISCAL" runat="server" ErrorMessage="Campo Requerido"></asp:RequiredFieldValidator></div></div><div class="clear"></div></div>
                        
                        <div class="softsales-form-linha">
                        <div class="grid_2">
                        <label for="Label_ENT_SAIDA">TIPO OPERAÇÃO</label>
                            <asp:DropDownList ID="DDL_ID_OPERACAO" runat="server">
                            </asp:DropDownList>
                        </div>
                        <div class="grid_2"><label for="Label_ID_CFOP">CFOP</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text large requerido" ID="TXT_CFOP" 
                        runat="server" MaxLength="4"></asp:TextBox><asp:ImageButton ID="IMG_BTN_ABRIR_MODAL_CFOP" runat="server" CausesValidation="False" ImageUrl="~/images/icons/application.gif" 
                          
                         /></div><div class="softsales-form-error"><asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="TXT_CFOP" runat="server" ErrorMessage="Campo Requerido"></asp:RequiredFieldValidator></div></div>
                         <div class="grid_8"><label >DESCRIÇÃO CFOP</label>  
                         <div class="softsales-form-campo">
                         <asp:TextBox CssClass="campo-text full" ID="TXT_DESC_CFOP" runat="server"></asp:TextBox></div>
                         
                         <div class="softsales-form-error"><asp:RequiredFieldValidator ID="RFV_ID_CFOP" ControlToValidate="TXT_DESC_CFOP" runat="server" ErrorMessage="Campo Requerido"></asp:RequiredFieldValidator></div>
                         
                         
                         </div>
                        <div class="clear"></div>
                         </div>
                         
                         <div class="softsales-form-linha"><div class="grid_2"><label for="Label_SIT_ESTOQUE">MOVIMENTA ESTOQUE</label> <div class="softsales-form-campo"><asp:CheckBox CssClass="campo-checkbox" 
                        runat="server" ID="CHK_SIT_MOVIMENTA_ESTOQUE" /></div></div><div class="grid_2"><label for="Label_SIT_FINANCEIRO">GERA FINANCEIRO</label> <div class="softsales-form-campo"><asp:CheckBox CssClass="campo-checkbox" 
                        runat="server" ID="CHK_SIT_GERA_FINANCEIRO" /></div></div><div class="clear"></div></div>
                         
                         </div></ContentTemplate>
                   </ajaxToolkit:TabPanel>
                   <ajaxToolkit:TabPanel ID="TAB_ICMS" runat="server" HeaderText="TabPanel2">
                   <HeaderTemplate>ICMS</HeaderTemplate>
                   <ContentTemplate><asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><div class="softsales-form"><div class="softsales-form-linha"><div class="grid_6"><asp:ListBox ID="LST_ICMS" runat="server" Width="100%" Rows="10"></asp:ListBox></div><div class="grid_6"><div class="softsales-form-linha"><div class="grid_12"><label for="Label_ID_CST_ICMS">CST_ICMS</label> <div class="softsales-form-campo"><asp:DropDownList CssClass="campo-select full" 
                    ID="DDL_ID_CST_ICMS" runat="server"></asp:DropDownList></div></div></div><div class="softsales-form-linha"><div class="grid_12"><label for="Label_ID_CSOSN">CSOSN</label> <div class="softsales-form-campo"><asp:DropDownList CssClass="campo-select full" 
                        ID="DDL_ID_CSOSN" runat="server"></asp:DropDownList></div></div></div><div class="softsales-form-linha"><div class="grid_12"><label for="Label_ID_ORIGEM_PRODUTO">ORIGEM_PRODUTO</label> <div class="softsales-form-campo"><asp:DropDownList ID="DDL_ID_ORIGEM_PRODUTO" 
                        runat="server" CssClass="campo-select full"></asp:DropDownList></div></div></div><div class="softsales-form-linha"><div class="grid_4"><label for="Label_ID_MOD_BC_ICMS">MOD_BC_ICMS</label> <div class="softsales-form-campo"><asp:DropDownList CssClass="campo-select full" 
                        ID="DDL_ID_MOD_BC_ICMS" runat="server"></asp:DropDownList></div></div><div class="grid_4"><label for="Label_VALOR_ALIQ_RED_BC_ICMS">VALOR_ALIQ_RED_BC_ICMS</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_RED_BC_ICMS" runat="server"></asp:TextBox></div></div><div class="grid_4"><label for="Label_VALOR_ALIQ_ICMS">VALOR_ALIQ_ICMS</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_ICMS" runat="server"></asp:TextBox></div></div><div class="clear"></div></div><div class="softsales-form-linha"><div class="grid_4"><label for="Label_ID_MOD_BC_ICMS_ST">MOD_BC_ICMS_ST</label> <div class="softsales-form-campo"><asp:DropDownList CssClass="campo-select full" 
                        ID="DDL_ID_MOD_BC_ICMS_ST" runat="server"></asp:DropDownList></div></div><div class="grid_4"><label for="Label_VALOR_ALIQ_ICMS_MVA_ST">VALOR_ALIQ_ICMS_MVA_ST</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_ICMS_MVA_ST" runat="server"></asp:TextBox></div></div><div class="grid_4"><label for="Label_VALOR_ALIQ_RED_BC_ICMS_ST">VALOR_ALIQ_RED_BC_ICMS_ST</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_RED_BC_ICMS_ST" runat="server"></asp:TextBox></div></div><div class="clear"></div></div><div class="softsales-form-linha"><div class="grid_4"><label for="Label_VALOR_ALIQ_ICMS_ST">VALOR_ALIQ_ICMS_ST</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_ICMS_ST" runat="server"></asp:TextBox></div></div><div class="grid_4"><label for="Label_VALOR_ICMS_ST_RET">VALOR_ICMS_ST_RET</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text moeda" ID="TXT_VALOR_ICMS_ST_RET" runat="server"></asp:TextBox></div></div><div class="grid_4"><label for="Label_VALOR_ICMS_ST_DEST">VALOR_ICMS_ST_DEST</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text moeda" ID="TXT_VALOR_ICMS_ST_DEST" runat="server"></asp:TextBox></div></div><div class="clear"></div></div><div class="softsales-form-linha"><div class="grid_4"><label for="Label_ID_MOT_DESONERACAO_ICMS">ID_MOT_DESONERACAO_ICMS</label> <div class="softsales-form-campo"><asp:DropDownList ID="DDL_ID_MOT_DESONERACAO_ICMS" runat="server" 
                        CssClass="campo-select full"></asp:DropDownList></div></div><div class="grid_4"><label for="Label_VALOR_ALIQ_BC_OP_PROPRIA">VALOR_ALIQ_BC_OP_PROPRIA</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text moeda" ID="TXT_VALOR_ALIQ_BC_OP_PROPRIA" runat="server"></asp:TextBox></div></div><div class="grid_4"><label for="Label_ID_UF">ID_UF</label> <div class="softsales-form-campo"><asp:DropDownList ID="DDL_ID_UF" runat="server"></asp:DropDownList></div></div><div class="clear"></div></div><div class="softsales-form-linha"><div class="grid_4"><label for="Label_VALOR_ALIQ_CRED_SN">VALOR_ALIQ_CRED_SN</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_CRED_SN" runat="server"></asp:TextBox></div></div><div class="grid_4"><label for="Label_VALOR_CRED_ICMS_SN">VALOR_CRED_ICMS_SN</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text moeda" ID="TXT_VALOR_CRED_ICMS_SN" runat="server"></asp:TextBox></div></div><div class="clear"></div></div><div class="softsales-form-linha"><div class="grid_6"><label for="Label_SIT_SOMA_IPI_BC_ICMS">SIT_SOMA_IPI_BC_ICMS</label> <div class="softsales-form-campo"><asp:CheckBox CssClass="campo-checkbox" runat="server" ID="CHK_SIT_SOMA_IPI_BC_ICMS" /></div></div><div class="grid_6"><label for="Label_SIT_SOMA_IPI_BC_ICMS_ST">SIT_SOMA_IPI_BC_ICMS_ST</label> <div class="softsales-form-campo"><asp:CheckBox CssClass="campo-checkbox" runat="server" ID="CHK_SIT_SOMA_IPI_BC_ICMS_ST" /></div></div><div class="clear"></div></div></div></div><div class="clear"></div></div></ContentTemplate></asp:UpdatePanel></ContentTemplate>
                   </ajaxToolkit:TabPanel>
                   <ajaxToolkit:TabPanel ID="TAB_IPI" runat="server" HeaderText="TabPanel3">
                   <HeaderTemplate>IPI</HeaderTemplate>
                   <ContentTemplate><asp:UpdatePanel ID="UpdatePanel2" runat="server"><ContentTemplate><div class="softsales-form"><div class="softsales-form-linha"><div class="grid_6"><asp:ListBox ID="LST_IPI" runat="server" Width="100%" Rows="10"></asp:ListBox></div><div class="grid_6"><div class="softsales-form-linha"><div class="grid_12"><label for="Label_DESC_IMPOSTO_IPI">DESC_IMPOSTO_IPI</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text full" 
                    ID="TXT_DESC_IMPOSTO_IPI" runat="server"></asp:TextBox></div></div></div><div class="softsales-form-linha"><div class="grid_12"><label for="Label_ID_CST_IPI">CST_IPI</label> <div class="softsales-form-campo"><asp:DropDownList CssClass="campo-select full" 
                    ID="DDL_ID_CST_IPI" runat="server"></asp:DropDownList></div></div></div><div class="softsales-form-linha"><div class="grid_4"><label for="Label_VALOR_ALIQ_IPI">VALOR_ALIQ_IPI</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_IPI" runat="server"></asp:TextBox></div></div><div class="grid_4"><label for="Label_VALOR_IPI">VALOR_IPI</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text moeda" ID="TXT_VALOR_IPI" runat="server"></asp:TextBox></div></div><div class="clear"></div></div></div><div class="clear"></div></div></div></ContentTemplate></asp:UpdatePanel></ContentTemplate>
                   </ajaxToolkit:TabPanel>
                   <ajaxToolkit:TabPanel ID="TAB_COFINS" runat="server" HeaderText="TabPanel4">
                   <HeaderTemplate>COFINS</HeaderTemplate>
                   <ContentTemplate><asp:UpdatePanel ID="UpdatePanel3" runat="server"><ContentTemplate><div class="softsales-form"><div class="softsales-form-linha"><div class="grid_6"><asp:ListBox ID="LST_COFINS" runat="server" Rows="10" Width="100%"></asp:ListBox></div><div class="grid_6"><div class="softsales-form-linha"><div class="grid_12"><label for="Label_DESC_IMPOSTO_COFINS">DESC_IMPOSTO_COFINS</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text full" ID="TXT_DESC_IMPOSTO_COFINS" runat="server"></asp:TextBox></div></div></div><div class="softsales-form-linha"><div class="grid_12"><label for="Label_ID_CST_COFINS">CST_COFINS</label> <div class="softsales-form-campo"><asp:DropDownList CssClass="campo-select full" 
                    ID="DDL_ID_CST_COFINS" runat="server"></asp:DropDownList></div></div></div><div class="softsales-form-linha"><div class="grid_4"><label for="Label_VALOR_ALIQ_COFINS">VALOR_ALIQ_COFINS</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_COFINS" runat="server"></asp:TextBox></div></div><div class="grid_4"><label for="Label_VALOR_ALIQ_COFINS_ST">VALOR_ALIQ_COFINS_ST</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_COFINS_ST" runat="server"></asp:TextBox></div></div><div class="clear"></div></div><div class="clear"></div></div><div class="clear"></div></div></div></ContentTemplate></asp:UpdatePanel></ContentTemplate>
                   </ajaxToolkit:TabPanel>
                   <ajaxToolkit:TabPanel ID="TAB_PIS" runat="server" HeaderText="TabPanel5">
                   <HeaderTemplate>PIS</HeaderTemplate>
                   <ContentTemplate><asp:UpdatePanel ID="UpdatePanel4" runat="server"><ContentTemplate><div class="softsales-form"><div class="softsales-form-linha"><div class="grid_6"><asp:ListBox ID="LST_PIS" runat="server" Rows="10" Width="100%"></asp:ListBox></div><div class="grid_6"><div class="softsales-form-linha"><div class="grid_12"><label for="Label_DESC_IMPOSTO_PIS">DESC_IMPOSTO_PIS</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text full" 
                    ID="TXT_DESC_IMPOSTO_PIS" runat="server"></asp:TextBox></div></div></div><div class="softsales-form-linha"><div class="grid_12"><label for="Label_ID_CST_PIS">CST_PIS</label> <div class="softsales-form-campo"><asp:DropDownList CssClass="campo-select full" 
                    ID="DDL_ID_CST_PIS" runat="server"></asp:DropDownList></div></div></div><div class="softsales-form-linha"><div class="grid_4"><label for="Label_VALOR_ALIQ_PIS">VALOR_ALIQ_PIS</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_PIS" runat="server"></asp:TextBox></div></div><div class="grid_4"><label for="Label_VALOR_ALIQ_PIS_ST">VALOR_ALIQ_PIS_ST</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_PIS_ST" runat="server"></asp:TextBox></div></div><div class="clear"></div></div><div class="clear"></div></div></div></div></ContentTemplate></asp:UpdatePanel></ContentTemplate>
                   </ajaxToolkit:TabPanel>
                   <ajaxToolkit:TabPanel ID="TAB_ISSQN" runat="server" HeaderText="TabPanel1">
                       <HeaderTemplate>ISSQN</HeaderTemplate>
                       <ContentTemplate><asp:UpdatePanel ID="UpdatePanel5" runat="server"><ContentTemplate><div class="softsales-form"><div class="softsales-form-linha"><div class="grid_6"><asp:ListBox ID="LST_ISSQN" runat="server" CssClass="campo-text full" Rows="10"></asp:ListBox></div><div class="grid_6"><div class="softsales-form-linha"><div class="grid_12"><label for="Label_DESC_IMPOSTO_ISSQN">DESC_IMPOSTO_ISSQN</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text full" 
                    ID="TXT_DESC_IMPOSTO_ISSQN" runat="server"></asp:TextBox></div></div></div><div class="softsales-form-linha"><div class="grid_12"><label for="Label_ID_SERVICO_ISSQN">SERVICO_ISSQN</label> <div class="softsales-form-campo"><asp:DropDownList ID="DDL_ID_SERVICO_ISSQN" 
                        runat="server" CssClass="campo-select full"></asp:DropDownList></div></div></div><div class="softsales-form-linha"><div class="grid_12"><label for="Label_VALOR_ALIQ_ISSQN">VALOR_ALIQ_ISSQN</label> <div class="softsales-form-campo"><asp:TextBox CssClass="campo-text porcentagem" 
                    ID="TXT_VALOR_ALIQ_ISSQN" runat="server"></asp:TextBox></div></div></div></div><div class="clear"></div></div></div></ContentTemplate></asp:UpdatePanel></ContentTemplate>
                   </ajaxToolkit:TabPanel>
            </ajaxToolkit:TabContainer>
 
 
                <div class="softsales-form">
                <div class="softsales-form-linha">
                <div class="grid_12">
		<asp:Button CssClass="botao-salvar" ID="BTN_SALVAR" runat="server" Text="Salvar" 
                onclick="BTN_SALVAR_Click" />
		<asp:Button CssClass="botao-cancelar" ID="BTN_CANCELAR"  CausesValidation="False" 
                runat="server" Text="Cancelar" onclick="BTN_CANCELAR_Click" />
		<asp:HiddenField ID="HF_ID" runat="server" />
		</div>
                
                </div>
                </div>
            
        
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ConteudoEsquerda" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ConteudoDireita" runat="server">
</asp:Content>
